]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Stop offsetting the focus rectangle
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 27 Feb 2021 10:37:24 +0000 (11:37 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 12 Mar 2021 15:56:12 +0000 (15:56 +0000)
The focus rectangle of the OSK currently gets stored with an offset that
removes the global coordinates and makes it window-local coordinates.
This offsetting has been applied since the introduction of the
FocusTracker with commit fc5ab4470445992b1ad4338290deb24e6b1c5ce2 and it
seems there's no real reason for it.

By removing this, we also emit position-changed when the window has
moved but the window-local coordinates stayed the same. We really want
to emit position-changed in that case because it might affect whether
the window needs to be shifted up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1728>

js/ui/keyboard.js

index 37b077d12b9f3706e680d544f14c2ed85e8ea6ae..43b4e5d27dc01c4fc2fcd1b64d5299f9d825415b 100644 (file)
@@ -624,8 +624,6 @@ var FocusTracker = class {
             const rectInsideFrameRect = grapheneFrameRect.intersection(rect)[0];
             if (!rectInsideFrameRect)
                 return;
-
-            rect.offset(-frameRect.x, -frameRect.y);
         }
 
         if (this._rect && this._rect.equal(rect))
@@ -643,12 +641,6 @@ var FocusTracker = class {
             height: this._rect.size.height,
         };
 
-        if (this._currentWindow) {
-            let frameRect = this._currentWindow.get_frame_rect();
-            rect.x += frameRect.x;
-            rect.y += frameRect.y;
-        }
-
         return rect;
     }
 };